package com.ruoyi.ruoyiqywechat.controller;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.ruoyiqywechat.service.qywechat.QrCodeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 二维码服务
 */
@Slf4j
@RestController
@RequestMapping("api/front/qrcode")
public class QrCodeController {
    @Autowired
    private QrCodeService qrCodeService;
    /**
     * 获取二维码
     * @return CommonResult
     */
    //(value="获取二维码")
    @RequestMapping(value = "/get", method = RequestMethod.POST)
    public R<Map<String, Object>> get(@RequestBody JSONObject data) {
        return R.ok(qrCodeService.get(data));
    }

}
